class InputNumber {
    initOptions(field) {
        field.dataAttribute = {
            min: "1",
            max: "100",
        };
    }
    getOptionsHtml(field) {
        let html = `
          <div class="form-group">
          <input type="number" id="fieldMin" style="width:100px" value="${field.dataAttribute?.min || "1"}" /> 
          <label style="width: 100px; float: inline-start;">最小值</label>
          </div>
          <div class="form-group">
          <input type="number" id="fieldMax" style="width:100px" value="${field.dataAttribute?.max || "100"}" /> 
          <label style="width: 100px; float: inline-start;">最大值</label>
          </div>
        `;
        return html;
    }
    collectOptionSettings(field) {
        field.dataAttribute.min = document.getElementById('fieldMin').value || "1";
        field.dataAttribute.max = document.getElementById('fieldMax').value || "100";
    }
}
export default new InputNumber;